package top.lingkang.finalsession.solon;

import org.noear.solon.core.handle.Context;
import top.lingkang.finalsession.core.FinalSessionHandler;

/**
 * solon下默认的session绑定处理
 *
 * @author lingkang
 * @create by 2024/5/9 17:27
 */
public class FinalSessionHandlerCookie implements FinalSessionHandler<Context, Context> {
    @Override
    public String getSessionId(Context context, String name) {
        return context.cookie(name);
    }

    @Override
    public void setSessionId(Context context, String name, String value) {
        context.cookieSet(name, value);
    }
}
